-
Notifications
You must be signed in to change notification settings - Fork 1.2k
add qsort_r
for unix, and qsort
and qsort_s
for windows
#4677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Some changes occurred in OpenBSD module cc @semarie |
`qsort_r` doesn't exist in OpenBSD, but the NetBSD definition is placed
in common file. Please move the definition in NetBSD specific file.
Thanks
|
Sure, I moved the definition to |
There is also a seperate and incompatible API that exists on older versions of FreeBSD before it was changed in 14.0 [1] [2]. Not sure if that needs to be handled here. [1] https://www.gnu.org/software/gnulib/manual/html_node/qsort_005fr.html |
Right, fun, the argument order of the function pointer is swapped in those earlier versions https://man.freebsd.org/cgi/man.cgi?query=qsort_r&manpath=FreeBSD+13.4-RELEASE I've fixed that by moving the correct definition into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well freebsd CI is happy now (all those 3 PRs got merged). Seems like something else is failing, I don't think that's due to this PR? |
Description
Add
qsort_r
for apple, freebsd and netbsd targets, andqsort
andqsort_s
for windows targets.Sources
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI